Zero-Length Profiles
QuickDraw GX automatically performs color matching whenever it draws or converts colors, and if you specify anil
color profile reference in any situation, QuickDraw GX uses the default color profile rather than using no profile.In some cases, however, you may want to prevent color matching from occurring for individual colors or shapes, such as when comparing or calibrating different devices. To do so, you can use a zero-length profile. A zero-length profile is a color profile object in which the profile data is of zero length. It is a valid QuickDraw GX object--its reference is not
nil
--but it contains no data. If you attach a zero-length profile to a color, QuickDraw GX performs no matching when that color is drawn or converted.If, for example, you want to see how each attached device represents pure blue, you can specify pure blue for an ink's color, attach a zero-length profile to it, and draw a shape with that color to each device. If instead you specify
nil
for the profile when creating
a color, QuickDraw GX matches the color, using the default color profile and each device's color profile, when drawing.In the case of color conversions that require a profile (those between base families, such as from RGB to XYZ), QuickDraw GX uses the following conventions:
- If both profiles are zero-length, QuickDraw GX uses the default profile as both the source and the destination profile.
- If only one profile is zero-length, QuickDraw GX uses the other profile as both the source and the destination profile.
You can create a zero-length profile using the
- Note
- To turn off color matching entirely when drawing to a view port, make sure that the
gxEnableMatchPort
attribute for that view port is cleared. (It is cleared by default.) View port attributes are discussed in the chapter "View-Related Devices" in this book.![]()
GXNewColorProfile
function, described on page 4-79, or theGXSetColorProfile
function, described on page 4-89.